Batch dispensing system for fluids

ABSTRACT

A system for dispensing batches of fluid comprising a flowmeter ( 5 ), a pump or valve ( 6 ) for starting and stopping the flow and a controller ( 9 ) for controlling the pump or the valve. In order to reach a target batch size, the settling time at start of the flowmeter is compensated for as well as for the time it takes to stop the flow by generating a stop signal before the target batch size is reached. Further, to compensate for variations in the actual flow caused by variations in the feed pressure and the like, the compensation is made a function of the actually measured flow. A controller or a batch flow meter for use in dispensing batches is equipped with an interface for setting a compensating time constant and a correction unit for compensation of changes in the flow. The correction unit can consist of a differentiator an a summation circuit. Using digital techniques, the correction unit can be made as a lead filter.

[0001] The present invention is concerned with systems for dispensing fluid in batches of a desired size, that is, a desired mass or volume.

[0002] The dispensing of fluids in batches of a desired size is a very common operation in many branches of industry. The term fluids in this connection covers a broad variety of flowable media such as true liquids, for example mineral oil products, beverages and liquid foodstuffs, gases, flowable solids such as fine powders, slurries etc. An example is the filling of containers for sale. The containers must be filled quickly to an exact amount. Repeated overfilling is as unacceptable for reasons of economy as repeated underfilling which might be considered fraudulous by customers or regulatory bodies. Incidents of container overflow because of excess overfilling, which can lead to contamination of production facilities, production stoppage and even dangerous situations such as fire hazard, must also be avoided.

[0003] A typical batch dispensing system comprises a fluid duct equipped with a flowmeter and an electrically controlled flow controller, such as a valve or a pump, for starting and stopping fluid flow to a dispensing nozzle or the like. The valve or pump is controlled by a control unit which receives the flowmeter's output signal (the flow signal). The control unit includes a facility for setting a desired batch size, a start signal generator, an integrator or accumulator for integrating the flow signal over time and a comparator for generating a stop signal when the integrated or accumulated flow signal equals the desired batch size. The accumulator is reset to zero after each batch. Flowmeter, valve or pump and control unit may be separate or integrated units. The fluid to be dispensed is typically led to the dispensing system from a storage tank, a pressurized container, a feed pressure generating pump or the like via a length of tubing.

[0004] The starting and stopping of the fluid flow in a dispensing system of the kind described makes it difficult to dispense exact batches. Most flowmeters follow changes in flow rate only with a certain time lag. Thus the measured flow will be smaller than the actual flow at least for some time after start, and the mass or volume measured by integration of the measured flow will be less than the actual mass or volume dispensed. Valves and pumps also take a certain time to close or stop which means that the integrator must develop a stop signal ahead of the time when flow must actually stop to result in an exact batch.

[0005] These problems are addressed in U.S. Pat. No. 5,431,302. The document describes a batch dispensing system with a flow controlling valve wherein the actual overfill is averaged over a number of batches. The average overfill is then used to cause an earlier closure of the valve so that subsequent batches will be filled exactly.

[0006] However the batch metering problem is compounded by the fact that typically the feed pressure of the fluid to be dispensed and thus the maximum flow rate occurring in each individual batch is not constant over time. In the general examples given above, the feed pressure decreases with the fluid head in the storage tank, or with the pressure in the pressurized container, as they are increasingly emptied. In more complicated process environments quite erratic feed pressure variations may occur. This is a problem which cannot be solved with the approach of U.S. Pat. No. 5,431,302.

[0007] To address this problem, the present invention provides a system for dispensing batches of fluid which comprises flow controlling means for starting a flow of fluid in response to a start signal and for subsequently stopping the flow of fluid in response to a stop signal, a flowmeter for measuring a flow rate of the fluid and generating a flow signal corresponding thereto, and a batch controller for generating the start signal, the batch controller receiving the flow signal and generating the stop signal in response thereto. The batch controller comprises storage means for storing a target batch size representation, integrating means for integrating the flow signal over time to develop a measured batch size representation, comparator means for comparing the target batch size representation with measured batch size representation and generating the stop signal when they are equal, and modifying means for modifying at least one of the target batch size representation and the measured batch size representation in response to the flow signal.

[0008] The system according to the invention alleviates the problem of variations in feed pressure by providing a correction in response to the actually observed flow, instead of a correction based on a forecast from past history.

[0009] The correction principles associated with the invention may also applied to batch controllers for controlling batch dispensing systems, and to flowmeters for use in such systems.

[0010] Preferred embodiments of the invention will now be described below with reference to the accompanying drawings.

[0011]FIG. 1 is a schematic drawing of a typical batch dispensing system.

[0012]FIG. 2 show the actual flow and the measured flow in the system of FIG. 1.

[0013]FIG. 3 is a diagram illustrating the mass or volume in the system of FIG. 1 as actually dispensed and as determined by an integrator receiving the flow signal.

[0014]FIG. 4 is a diagram of the actual flow and the measured flow in a dispensing system which has been simplified for purposes of calculation.

[0015]FIG. 5 is a diagram similar to FIG. 4 illustrating a different valve closing characteristic.

[0016]FIG. 6 is a block diagram of a prior art batch controller.

[0017]FIGS. 7 and 8 are block diagrams of a batch dispensing system with flow-dependent modification of the comparator triggering point.

[0018]FIG. 9 is a block diagram of a batch dispensing system with lead compensation of the flow signal for use with an unmodified batch controller.

[0019]FIG. 10 shows the actual flow and a compensated flowmeter signal generated in the dispensing system of FIG. 9.

[0020]FIG. 11 is a diagram illustrating the mass or volume in the system of FIG. 9 as actually dispensed and as determined by the integrator receiving the compensated flowmeter signal.

[0021]FIG. 12 is a block diagram of a modified flowmeter having batch metering functionality, which may be used with a conventional batch dispensing controller in a system similar to that of FIG. 1.

[0022] In the batch dispensing system of FIG. 1, liquid 1 from a storage tank 2 is fed to a dispensing nozzle 3 via a feed line 4 equipped with an electronic flowmeter 5 and an electrically controlled shut-off valve 6. Containers 7 to be filled with the liquid are conveyed to the nozzle 3 on a conveying system 8. The dispensing operation is controlled by a batch controller 9.

[0023] The batch controller receives a flow signal 10 from the flowmeter 5 which indicates the instantaneous flow rate in the feed line 4 and thus the instantaneous flow rate of the liquid 1 dispensed at the nozzle 3. Depending on the application the flowmeter may be a mass flowmeter or a volume flowmeter. The controller transmits start and stop signals 11 to the shutoff valve 6 to control the flow leaving the nozzle 3. The valve opens on receiving a start signal and closes on receiving a stop signal.

[0024] The controller 9 has a display 12, a keyboard 13, a start button 14 and a stop button 15. The keyboard is used to enter a target batch size (a desired mass or volume of liquid to be filled into each container). Once the target batch size has been set and stored in the controller, the dispensing operation is started with the start button 14. The controller operates the conveying system 8 via line 16 to convey a first container 7 into position below the nozzle 3, where its presence is detected by a sensor 17 and signaled to the controller via line 18. The controller then sends the start signal on line 11 to the valve 6 to start the flow and later sends the stop signal on line 11 to stop the flow when it has been determined from an integration of the flow signal 10 that the target batch size has been dispensed into the container 7. The conveying and dispensing sequence is repeated until the stop button 15 on the controller is actuated.

[0025] The thick curve 21 in FIG. 2 illustrates the variation in time of the flow leaving the nozzle 3. The start signal is sent at t=0, and the stop signal is sent at t=T. When the valve 6 opens at t=0, the flow 21 gradually builds up to a maximum value Q₀. When the valve 6 receives the stop signal at t=T, it starts to close and the flow rate 21 is gradually reduced to zero. The flow signal 22 (thin line in FIG. 2), that is, the response of the flowmeter 5 typically lags somewhat behind the actual flow 21 through the meter. This lagging behaviour is also illustrated in FIG. 2.

[0026] The resulting mass or volume dispensed into the container 7 over time is illustrated in FIG. 3. The target batch size is indicated as M_(T). The actual batch size development is illustrated by the thick line 31 whereas the measured batch size development, which results from an integration of the flow signal 22, is illustrated by the thin line 32.

[0027] It is evident from FIG. 3 that the combined effect of the flowmeter's time lag and the slow closing of the valve causes a need to generate the stop signal at a time T when the measured batch size is still below the target batch size M_(T). The batch controller must therefore be set to trigger the stop signal when the dispensed mass or volume reaches the stop level M_(S).

[0028] A simple prior art batch controller is shown in FIG. 6. A logic unit 67 is connected with the start and stop buttons 14 and 15. When the start button is pressed, the logic unit 67 resets and enables an integrator 61 via lines 68 and 69 and sends the start signal to the valve 6. The integrator 61 receives the flow signal 10 from flowmeter 5. A target batch size memory 62 is set to hold the target batch size using the keyboard 13. A comparator 63 compares the output signal 64 of the integrator 61 with the target batch size 65 and signals on line 66 when the target batch size is achieved. The logic unit 67 receives the trigger 66 and stops the flow. The logic unit also handles the conveying functions which need not be detailed.

[0029] In the prior art controller of FIG. 6, the target batch size 65 must be set to a value which is smaller than the actually desired batch size to compensate for flowmeter lag and slow valve closing, as has been explained above.

[0030] In the diagram of FIG. 4 it is assumed for simplicity that the actual flow q, line 41, rises stepwise to its steady-state value Q₀ and that the step response 42 of the flowmeter signal q_(f) is

q _(f)(t)=Q ₀(1−exp(−t/τ _(f))  (1)

[0031] wherein τ_(f) is a characteristic time constant of the flowmeter.

[0032] The true batch mass or volume delivered up to the time T is

M _(T) =Q ₀ T  (2)

[0033] which is indicated as the hatched area 43 whereas the batch mass or volume measured by integration of the flowmeter signal, equation (1) above, is $\begin{matrix} \begin{matrix} {{Mf} = \quad {\int_{0}^{T}{{Q_{0}\left( {1 - {\exp \left( {{- t}/\tau_{f}} \right)}} \right)}\quad {t}}}} \\ {\approx \quad {{Q_{0}T} - {Q_{0}\tau_{f}}}} \end{matrix} & (3) \end{matrix}$

[0034] The valve is also assumed for simplicity to close exponentially according to the equation

q _(v) =Q ₀ exp(−t/τ _(v))  (4)

[0035] wherein q_(v) is the flow out of the nozzle 3 during the closing of the valve, indicated as the part of curve 41 delimiting the hatched area 44 in FIG. 4, and τ_(v) is a characteristic time constant of the valve 6. The valve closing contributes an additional mass or volume which is dispensed after the time T, which may be found by integrating equation (4) as t,0081

[0036] and which is shown as hatched area 44. This results in a total actually delivered batch mass or volume of

M _(b) =M _(T) +M _(v) 32 Q ₀ T+Q ₀τ_(v).  (6)

[0037] By combining equations (3) and (6) we find that

M _(f) =M _(b) −Q ₀(τ_(f)+τ_(v))  (7)

[0038] or, in words, the result of the integration of the flowmeter signal up to the time T when the stop signal needs to be given, is less than the mass or volume actually dispensed by the dispensing system, by the amount Q₀ (τ_(f)+τ_(v)).

[0039] In other words, with the assumptions of FIG. 4, the comparator must be set to trigger at the value

M _(S) =M _(b) −Q ₀(τ_(f)+τ_(v))  (7a)

[0040] to cause an exact dispensing of a desired batch mass or volume M_(b).

[0041]FIG. 5 serves to show that similar considerations apply if the valve closing characteristic is not exponential but linear as shown by line 51; it is immediately apparent that the mass or volume delivered during the closing of the valve is equal to

M _(v) ′=Q ₀τ_(v)′  (8)

[0042] wherein T_(v)′ is defined as half the closing time of the valve. It can thus be said that the required comparator setting will generally be of the form of equation (7a) if τ_(v) is properly defined.

[0043] Referring now again to FIG. 1 it can be seen that the pressure in the feed line 4 will vary with the level h of the liquid in the storage tank 2. This pressure variation causes a variation in the steady state flow rate Q₀ which influences on the batch metering process.

[0044] With equation (7a) above rearranged as

M _(b) =M _(S) +Q ₀(τ_(f)+τ_(v))  (9)

[0045] we will now consider the effect of a change ΔQ₀ in the steady state flow rate Q₀ brought about by a change ΔP in the feed pressure in line 4. The change ΔQ₀ will leave the trigger point setting M_(S) of the comparator unchanged. This means that the amount M_(f) metered out by the flowmeter before the comparator triggers the closing of the valve will remain unchanged, because the triggering will just occur correspondingly earlier or later in time. However, the change will bring about a change in the mass or volume which is actually dispensed but not measured by the flowmeter because of its lag time, and in the mass or volume M_(v) which is dispensed during the closing of the valve. Thus the change ΔQ₀ causes a change ΔM_(b) which can be expressed as

ΔM _(b)=(τ_(f)+τ_(v))ΔQ ₀.  (10)

[0046] Requiring that the resulting batch mass or volume be unchanged (ΔM_(b)=0) we find that the target batch size or comparator setting must be changed correspondingly:

ΔM _(S)=−(τ_(f)+τ_(v))ΔQ ₀.  (11)

[0047] From an inspection of FIGS. 2 and 3 it becomes apparent that the flowmeter signal q_(f) generally rises to the steady state flow value Q₀ well before the integrator reaches its setpoint M_(f). This allows the generalization that equations (7) and (11) can be cast in the general form

M _(S) =M _(b) −q _(f)(τ_(f)+τ_(v))  (12)

[0048] which means that the target batch size value, or comparator setpoint M_(S), may be allowed to float with the flowmeter signal q_(f). Because of the inherent timing of the process the comparator trigger value M_(S) will be in place and up-to-date with respect to the actual flow when the flow integration process gets near to it.

[0049] The batch dispensing systems shown in FIGS. 7 and 8 take advantage of this observation. In the system of FIG. 7, which shows a digital realization, the flow signal is delivered in the form of digital samples on line 10 to a multiplier unit 71 and to a an integrator 61. The sum of the system time constants τ_(f)+τ_(v) is input to the multiplier unit 71 via the keyboard 13. The product q_(f) (τ_(f)+τ_(v)) of the sum of the system time constants and the flowmeter signal generated by the unit is passed on to a subtracting unit 72 where it is subtracted from the target batch size held in the target batch size memory 62. The modified target batch size, or comparator trigger value M_(S) is then passed on to the comparator 63 where it is compared to the integrated flow signal from integrator 71. This is a direct realization of equation (12).

[0050] In the dispensing system of FIG. 8 the product q_(f) (τ_(f)+τ_(v)) generated by multiplier unit 71 is added to the output signal of integrator 61 by means of adder 81. The sum is then passed to the comparator for comparison with the target batch size value entered into the batch size memory 62 via the keyboard 13. This corresponds to a rearrangement of equation (12) to give the M_(b) in terms of M_(S) and q_(f) (τ_(f)+τ_(v)). As in FIG. 7 the sum of the system time constants τ_(f)+τ_(v) is input to the multiplier unit 71 via the keyboard 13. All other elements in FIGS. 7 and 8 perform the same functions as their counterparts in FIG. 6 having the same reference numbers, and elements 6, 8, 14, 15 and 17 have been omitted.

[0051] The systems of FIGS. 7 and 8 both require that modifications be made to the traditional batch controller shown in FIG. 6. It is possible, however, to achieve substantially the same flow-dependent correction of the target batch size by modification of the flowmeter. This will now be explained.

[0052] Starting from the slightly simplified situation of FIG. 4 and equation (1) again, we have

q _(f)(t)=Q ₀(1−exp(−t/τ _(f))  (1)

[0053] If we add to this function its own time derivative multiplied by the system time constants (τ_(f)+τ_(v)) and integrate the result, we arrive at $\begin{matrix} \begin{matrix} {{{\int_{0}^{T}{{q_{f}(t)}\quad {t}}} + {\int_{0}^{T}{\left( {\tau_{f} + \tau_{v}} \right){{\overset{.}{q}}_{f}(t)}\quad {t}}}} = \quad {{Q_{0}T} - {Q_{0}\tau_{f}} +}} \\ {\quad {\left( {\tau_{f} + \tau_{v}} \right){\int_{0}^{T}{{{\overset{.}{q}}_{f}(t)}\quad {t}}}}} \\ {= \quad {{Q_{0}T} - {Q_{0}T} +}} \\ {\quad {\left( {\tau_{f} + \tau_{v}} \right)\left( {{q_{f}(T)} - {q_{f}(0)}} \right.}} \\ {= \quad {{Q_{0}T} - {Q_{0}\tau_{f}} +}} \\ {\quad {\left( {\tau_{f} + \tau_{v}} \right)Q_{0}}} \\ {= \quad {{Q_{0}T} + {Q_{0}\tau_{v}}}} \\ {= \quad M_{b}} \end{matrix} & (13) \end{matrix}$

[0054] wherein {dot over (q)}_(f) means the time derivative of the flowmeter signal q_(f).

[0055] This means that batch dispensing operation can be compensated for the combined effect of the lag time of the flowmeter and the closing time of the valve or stopping time of the pump by adding to the flowmeter signal q_(f) its own derivate multiplied by the sum of the system time constants, and performing the integration on the sum. A flowmeter signal modified this way can be fed directly into a conventional batch controller such as that shown in FIG. 6.

[0056] A batch dispensing system controller incorporating this approach is shown in FIG. 9. The flowmeter signal on line 10 is fed to a differentiating unit 91 which generates the time derivative of the flowmeter signal. A multiplier unit 92 receives the time derivative signal and multiplies it with the sum of the system time constants (τ_(f)+τ_(v)) which has been entered using the keyboard 13. The multiplied derivative is added to the flowmeter signal by an adder 93, and the resulting sum is fed to the integrator 61. The comparator 63 compares the integrated sum signal to the target batch size in memory 62. In this instance, the target batch size can be entered directly; the operator does not need to make any manual compensation.

[0057] In FIG. 10, the thick curve 101 shows the actual flow dispensed from the nozzle 3 and the thin curve 102 shows the compensated flow signal at the output of the adder 93 in FIG. 9. It can be seen that the compensation causes an overshoot whose magnitude is dependent on the multiplication factor (τ_(f)+τ_(v)) entered into the system of FIG. 9 via the keyboard 13.

[0058] The effect of the compensation on the comparator setpoint M_(S) is illustrated in FIG. 11. The thick curve 111 shows the actual flow dispensed from the nozzle 3 (see FIG. 1) and the thin curve 112 shows the output signal of the integrator 61 in FIG. 9. The effect of the overshoot caused by the compensation of the flow signal is that the comparator can be set at M_(S)=M_(b). The compensation will cause the integrated signal to reach M_(S) early; thus the stop signal for the valve 6 (see FIG. 1) will be generated so early that the container is filled to the exact target batch mass or volume M_(b) during the closing time of the valve 6.

[0059]FIG. 12 shows substantially the same system as FIG. 9 wherein the flowmeter and the functional units for compensating the flowmeter signal have been united and supplemented with a separate keyboard 121 and a keyboard-controlled selecting switch 122 to provide a versatile batch flowmeter 5′. With the switch 122 in the position as shown, the flowmeter 5′ functions as a conventional flowmeter. With the switch 122 in the other position, the output signal of the flowmeter 5′ results from an addition of the flow signal 10 with its own time derivative muliplied by a compensation factor (τ_(f)+τ_(v)) which can be entered via the keyboard 121. Thus the flowmeter 5′ can be switched to provide a normal flow signal or a flow signal compensated for batch metering, and the compensation is variable by entering the proper compensation factor via the keyboard. This allows an adaptation of the flowmeter 5′ to batch dispensing systems having different closing times or stopping times of the dispensing valve or pump.

[0060] It should be mentioned in closing that the combined effect of generating a time derivative of the flow signal, multiplying the time derivative with a time constant to provide a multiplied derivative signal and adding the multiplied derivative signal to the flow signal can be performed by filtering the flow signal with a digital signal processing filter known as a variable lead filter.

[0061] Given a sequence of sampled flow signal values (x_(l)), the lead filter would be constructed to output a sequence of filtered signal values (y_(i)) formed as

y _(i) =x _(l)+((x _(i) −x _(i)−1)(τ_(f)+τ_(v))/t _(samp))  (14)

[0062] wherein t_(samp) is the sampling time interval.

[0063] The sequence (y_(l)) of samples generated by such a lead filter is equivalent to the modified flow signal 102 generated by the combination of the differentiator 91, the multiplier 92 and the adder 93 in FIG. 9, and digital summation of the sequence (y_(i)) is equivalent to the integration performed by integrator 61. In other words, the variable lead filter could be a single unit which would be substitued for the elements 91, 92 and 93 in a digital realization of the principles of the invention. The lead filter would receive the time factor (τ_(f)+τ_(v)) from the keyboard 13 in FIG. 9. 

1. A system for dispensing batches of fluid, comprising: flow controlling means for starting a flow of fluid in response to a start signal and for subsequently stopping the flow of fluid in response to a stop signal; a flowmeter for measuring a flow rate of the fluid and generating a flow signal corresponding thereto; and a batch controller for generating the start signal, the batch controller receiving the flow signal and generating the stop signal in response thereto; wherein the batch controller comprises: storage means for storing a target batch size representation; integrating means for integrating the flow signal over time to develop a measured batch size representation; modifying means for modifying one of the batch size representations in response to the flow signal; and comparator means for comparing the modified batch size representation with the other batch size representation and generating the stop signal when they are equal.
 2. A system as in claim 1 wherein the modifying means modifies the target batch size representation in response to the measured flow signal.
 3. A system as in claim 1 wherein the modifying means modifies the measured batch size representation in response to the measured flow signal.
 4. A system as in claim 3 further comprising differentiating means for developing a derived signal representing a rate of change of the flow signal, and wherein the modifying means is also responsive to the derived signal.
 5. A system as in claim 4 wherein the modifying means is operative to superimpose a representation of the derived signal on the measured batch size representation.
 6. A system as in claim 5 wherein the modifying means is coupled to add a representation of the derived signal to the flow signal to form a combined signal, and wherein the integrating means integrates the combined signal to develop the measured batch size representation.
 7. A batch controller for use in a system for dispensing batches of fluid, the batch controller being operative to generate a start signal for starting fluid flow, to receive a flow signal and to generate a stop signal in response thereto for stopping fluid flow, which batch controller comprises: storage means for storing a target batch size representation; integrating means for integrating the flow signal over time to develop a measured batch size representation; comparator means for comparing the target batch size representation with the measured batch size representation and generating the stop signal when they are equal; and modifying means for modifying at least one of the target batch size representation and the measured batch size representation in response to the flow signal.
 8. A batch controller as in claim 7 wherein the modifying means modifies the target batch size representation in response to a measured flow rate value.
 9. A batch controller as in claim 7 wherein the modifying means modifies the measured batch size representation in response to a measured flow rate value.
 10. A batch controller as in claim 7 further comprising differentiation means for developing a derived signal representing a rate of change of the flow signal, and wherein the modifying means is also responsive to the derived signal.
 11. A batch controller as in claim 10 wherein the modifying means is operative to superimpose a representation of the derived signal on the measured batch size representation.
 12. A batch controller as in claim 11 wherein the modifying means is coupled to add the a representation of the derived signal to the flow signal to form a combined signal, and wherein the integrating means integrates the combined signal to develop the measured batch size representation.
 13. A batch flow meter for use in a system for dispensing batches of fluid, comprising: a flowmeter for measuring a flow rate of the fluid and generating a flow signal corresponding thereto; differentiation means for developing a derived signal representing a rate of change of the flow signal, and summation means for adding a representation of the derived signal to the flow signal to form a batch flow signal.
 14. A system as in claim 1 , 2 or 3 further comprising input means for entering a compensation time constant and a multiplier for multiplying the flow signal with the compensation time constant to generate an intermediate signal, and wherein the modifying means modifies the batch size representation by performing an additive superposition of the intermediate signal on the batch size representation.
 15. A system as in claim 4 , 5 or 6 further comprising input means for entering a compensation time constant and means for multiplying the derived signal with the compensation time constant to generate the representation of the derived signal.
 16. A batch controller system as in claim 7 , 8 or 9 further comprising input means for entering a compensation time constant and a multiplier for multiplying the flow signal with the compensation time constant to generate an intermediate signal, and wherein the modifying means modifies the batch size representation by performing an additive superposition of the intermediate signal on the batch size representation.
 17. A batch controller as in claim 10 , 11 or 12 further comprising input means for entering a compensation time constant and means for multiplying the derived signal with the compensation time constant to generate the representation of the derived signal.
 18. A batch flowmeter as in claim 13 further comprising input means for entering a compensation time constant and means for multiplying the derived signal with the compensation time constant to generate the representation of the derived signal. 